import packages from './packges/index';

console.log("packages:",packages, Object.keys(packages), Object.values(packages), Object.entries(packages))

// const install = Object.values(packages).forEach(item => {
//     console.log(item.name, item)
//     item.install = function (Vue) {
//         Vue.component(item.name, item);
//     }
// })

// 全局注册主键
// export function registerUi(app: App): void {
//     for (const component of components) {
//       app.component(component.name, component);
//     }
//   }

// 定义install方法
const install = function (Vue) {
    if (install.installed) return;
    Object.values(packages).forEach(item => {
        console.log(item.name, item)
        Vue.component(item.name, item);
        Vue.use(item)
    })
}


export {    
    // Button,
    // Modal
}

export default install;